package io;

import view.Designer;
import model.Prescription;/** * A class to encapsulate the exportation to XML functionality of the designer * @author Daniel Bond, Mohammed Abdullah, Gideon Pyzer * */
public class ExportXML {
		/**	 * Exports the current prescription to XML with the given filename	 * @param filename the filename of the prescription	 */
	public static void export(String filename){
		Designer designer = Designer.getInstance();
		xmlParser.getInstance().saveXML(Prescription.getInstance(), filename);		designer.showMessageDialog("Prescription saved successfully");
		designer.update();
		Prescription.getInstance().setUnchanged();
		designer.updateTitle();
	}
}